Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SF-3052 Add interactive-widget setting to viewport meta tag #2820

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

josephmyers
Copy link
Collaborator

@josephmyers josephmyers commented Oct 23, 2024

Chrome 108 (Nov '22) added support for this new tag, which resizes the visual viewport to the visible space. It does not appear after brief investigation that Safari supports this, and Firefox has been documented to resize with or without this setting.

Note that if we choose to hide the bottom bar in the future (which is currently the case), it may not be quite necessary to use "resizes-content" as compared to the other accepted values. It may be that, given that bar will go away, the value "overlays-content" may also suffice. However, the default (resizes-visual for Chrome) likely would cause buggy behavior, given that it currently hides the top bar.


This change is Reviewable

@josephmyers
Copy link
Collaborator Author

I'm aware that this is not expected to be supported on Safari. My current stance is that improving the experience for some browsers without harming others is better than what is currently in Live.

@josephmyers josephmyers marked this pull request as ready for review October 23, 2024 06:43
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.10%. Comparing base (55332a6) to head (cee0845).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2820      +/-   ##
==========================================
- Coverage   79.10%   79.10%   -0.01%     
==========================================
  Files         531      531              
  Lines       30859    30859              
  Branches     5016     5038      +22     
==========================================
- Hits        24411    24410       -1     
+ Misses       5674     5662      -12     
- Partials      774      787      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kylebuss kylebuss self-assigned this Oct 23, 2024
Copy link
Collaborator

@kylebuss kylebuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work Joseph! I think resizes-content makes most sense, even down the road. I briefly read up on this and looks like Chrome/Safari on iOS already does this natively and the changes in Chrome 108 was to bring Android up to par.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @josephmyers)

@josephmyers
Copy link
Collaborator Author

Interesting, Kyle, as I came to a different conclusion about Safari. It seems like, based on https://github.com/bramus/viewport-resize-behavior/blob/main/explainer.md#the-visual-viewport, that Safari overlays its keyboard, which would result in bottom-fixed content being hidden. It'd be valuable to test this on an actual device, though, though I don't think it should hold up this improvement. Most of what I was seeing on the net indicated that custom visual viewport calculation would be required to resize bottom content for Safari. Maybe these sources are out of date now?

@josephmyers josephmyers enabled auto-merge (squash) October 28, 2024 00:06
@josephmyers josephmyers added testing complete Testing of PR is complete and should no longer hold up merging of the PR and removed ready to test labels Oct 28, 2024
Chrome 108 (Nov '22) added support for this new tag, which resizes the visual viewport to the visible space. It does not appear after brief investigation that Safari supports this, and Firefox has been documented to resize with or without this setting.

Note that if we choose to hide the bottom bar in the future (which is currently the case), it may not be quite necessary to use "resizes-content" as compared to the other accepted values. It may be that, given that bar will go away, the value "overlays-content" may also suffice. However, the default (resizes-visual for Chrome) likely would cause buggy behavior, given that it currently hides the top bar.
@josephmyers josephmyers merged commit f5038ae into master Oct 28, 2024
15 checks passed
@josephmyers josephmyers deleted the fix/SF-3052 branch October 28, 2024 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing complete Testing of PR is complete and should no longer hold up merging of the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants